package com.atguigu.guli.service.edu.entity.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.List;

@Data
@ApiModel("课程分类的视图类")
public class SubjectVo {
    //id
    private String id;
    @ApiModelProperty("课程分类标题")
    private String title;
    @ApiModelProperty("二级分类集合")
    private List<SubjectVo> children;

//    SELECT c.`subject_id`,s1.`title` AS one_title,c.`subject_parent_id`,s2.`title` AS two_title
//    FROM edu_course c
//    JOIN edu_subject s1 ON c.subject_parent_id = s1.id
//    JOIN edu_subject s2 ON c.subject_id = s2.id
//    WHERE publish_time IS NOT NULL
}